﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace YXShop.Model.Templates
{ 
   [Serializable]
    public class FreeLabel
    {
       
       #region "model"
       private int _id;      
       /// <summary>
       /// 自由标签ID
       /// </summary>
        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }
        private string _labelName; 
       /// <summary>
        /// 标签名称
       /// </summary>
        public string LabelName
        {
            get { return _labelName; }
            set { _labelName = value; }
        }
        private string _labelSql;   
       /// <summary>
        /// sql语句
       /// </summary>
        public string LabelSql
        {
            get { return _labelSql; }
            set { _labelSql = value; }
        }
        private string _styleContent; 
       /// <summary>
       /// 标签内容
       /// </summary>
        public string StyleContent
        {
            get { return _styleContent; }
            set { _styleContent = value; }
        }
        private string _description;  
       /// <summary>
       /// 描述
       /// </summary>
        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }
        private Nullable<Int32> _labelType; 
       /// <summary>
        /// 标签类型
       /// </summary>
        public Nullable<Int32> LabelType
        {
            get { return _labelType; }
            set { _labelType = value; }
        }
        private Nullable<DateTime> _createTime;  
       /// <summary>
       /// 更新时间
       /// </summary>
        public Nullable<DateTime> CreateTime
        {
            get { return _createTime; }
            set { _createTime = value; }
        }
        private int _typeId;    
       /// <summary>
        /// 关联标签分类表ID
       /// </summary>
        public int TypeId
        {
            get { return _typeId; }
            set { _typeId = value; }
        }
        private int _labelClass;
       /// <summary>
       /// 
       /// </summary>
        public int LabelClass
        {
            get { return _labelClass; }
            set { _labelClass = value; }
        }

        #endregion

       #region "Constructor"
        public FreeLabel()
        {
        }
        public FreeLabel(string lblname, string lblsql, string stycontent, string description, Nullable<Int32> type, Nullable<DateTime> time, int lableClass, int ltid)
        {
            _labelName = lblname;
            _labelSql = lblsql;
            _styleContent = stycontent;
            _description = description;
            _labelType = type;
            _createTime = time;
            _labelClass = lableClass;
            _typeId = ltid;
        }
        public FreeLabel(int id, string lblname, string lblsql, string stycontent, string description, Nullable<Int32> type, Nullable<DateTime> time, int lableClass, int ltid)
        {
            _id = id;
            _labelName = lblname;
            _labelSql = lblsql;
            _styleContent = stycontent;
            _description = description;
            _labelType = type;
            _createTime = time;
            _labelClass = lableClass;
            _typeId = ltid;
        }

        #endregion 
 
       #region 内部类
        //内部类
        public class FreeLablelDBInfo
        {
            private string _name;  //列名
            private string _description; //描述
            private string _dbtype;   //类型
            public FreeLablelDBInfo(string SName, string SDesc, string STypeName)
            {
                _name = SName;
                _description = SDesc;
                _dbtype = STypeName;
            }
            /// <summary>
            /// 列名
            /// </summary>
            public string Name
            {
                get { return _name; }
            }
            /// <summary>
            /// 描述
            /// </summary>
            public string Description
            {
                get { return _description; }
            }
            /// <summary>
            /// 类型
            /// </summary>
            public string TypeName
            {
                get { return _dbtype; }
            }
        }
        #endregion
    }
}
